import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import store from './vuex/index'
import Navigation from 'vue-navigation'
import Vuelazyload from 'vue-lazyload'

Vue.use(Navigation, {router, store});

Vue.use(VueLazyLoad, {
  loading: require("../static/img/加载中沙漏.png")
});

//引入UI组件
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'

Vue.use(MintUI);

//全局引入axios文件  网络框架
import axios from 'axios';

Vue.prototype.$axios = axios;
import qs from 'qs';

Vue.prototype.$qs = qs;
//全局引入网络接口文件
import apis from './http/apis'

Vue.prototype.$apis = apis;
//全局引入是不是移动设备文件
import isMoblie from './utils/isMobile'

Vue.prototype.$isMoblie = isMoblie;

//引入vue-resource
import VueResource from 'vue-resource';

Vue.use(VueResource);

import VueLazyLoad from 'vue-lazyload'

//全局注册header
import MyHeader from './common/MyHeader'

Vue.component("my-header", MyHeader);
//全局注册自定义定时器组件
import MyTimer from './common/MyTimer'

Vue.component("my-timer", MyTimer);

import myUtils from './utils/MyUtils';
Vue.prototype.$myUtils=myUtils;
// 阻止启动生产消息
Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: {App}
})
